package com.cn.lyl.lawyer.controller;

import com.cn.lyl.lawyer.model.entity.CompanyModel;
import com.cn.lyl.lawyer.service.CompanyService;
import com.cn.lyl.lawyer.util.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/back/company")
public class CompanyController {
@Autowired
private CompanyService companyService;
    @PostMapping("/edit")
    public Object update(CompanyModel companyModel){
        companyService.edit(companyModel);
        return CommonResult.success(null);
    }
    @GetMapping("/findInfo")
    public Object find(){
        CompanyModel companyModel = companyService.find();
        return CommonResult.success(companyModel);
    }


}
